package cn.maihe.elg.operation.centers.supports;

import cn.maihe.elg.operation.common.TradeContext;
import cn.maihe.elg.operation.model.dto.BaseReq;
import cn.maihe.elg.operation.model.dto.BaseResp;
import cn.maihe.elg.operation.model.enums.CenterNoEnum;
import lombok.Builder;
import lombok.Data;

/**
 * @Description
 * @Author WJH
 * @Date 2021/04/16
 */
public class CenterTradeContext<REQ extends BaseReq, RESP extends BaseResp> extends TradeContext<REQ, RESP> {

    private final CenterNoEnum centerNoEnum;
    private String centerNo;
    private final String orgCode;
    private long centerId;
    private final long orgId;


    public CenterTradeContext(REQ req, String centerNo, String orgCode, long centerId, long orgId) {
        super(req);

        this.centerNo = centerNo;
        this.centerNoEnum=CenterNoEnum.resolve(centerNo);
        this.orgCode = orgCode;
        this.centerId = centerId;
        this.orgId = orgId;
    }

    public String getCenterNo() {
        return centerNo;
    }

    public String getOrgCode() {
        return orgCode;
    }

    public long getCenterId() {
        return centerId;
    }

    public long getOrgId() {
        return orgId;
    }

    public void setCenterId(String centerNo, long centerId){
        this.centerNo = centerNo;
        this.centerId = centerId;
    }

    public CenterNoEnum getCenterNoEnum() {
        return centerNoEnum;
    }
}
